/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elaborate.tag_analysis.client;

import elaborate.tag_analysis.client.applications.Application;
import elaborate.task.Task;
import elaborate.task.TaskQueue;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.JTree;

/**
 *
 * @author lendle
 */
public class DefaultServiceContextImpl implements ServiceContext{

    protected Application activeApplication;
    protected JTree resourceTree;
    protected JTable tagTable;
    protected TaskQueue taskQueue;
    private Component mainFrame;

    /**
     * Get the value of mainFrame
     *
     * @return the value of mainFrame
     */
    public Component getMainFrame() {
        return mainFrame;
    }

    /**
     * Set the value of mainFrame
     *
     * @param mainFrame new value of mainFrame
     */
    public void setMainFrame(Component mainFrame) {
        this.mainFrame = mainFrame;
    }

    

    /**
     * Get the value of taskQueue
     *
     * @return the value of taskQueue
     */
    public TaskQueue getTaskQueue() {
        return taskQueue;
    }

    /**
     * Set the value of taskQueue
     *
     * @param taskQueue new value of taskQueue
     */
    public void setTaskQueue(TaskQueue taskQueue) {
        this.taskQueue = taskQueue;
    }


    /**
     * Get the value of tagTable
     *
     * @return the value of tagTable
     */
    public JTable getTagTable() {
        return tagTable;
    }

    /**
     * Set the value of tagTable
     *
     * @param tagTable new value of tagTable
     */
    public void setTagTable(JTable tagTable) {
        this.tagTable = tagTable;
    }


    /**
     * Get the value of tagTree
     *
     * @return the value of tagTree
     */
    public JTree getResourceTree() {
        return resourceTree;
    }

    /**
     * Set the value of tagTree
     *
     * @param tagTree new value of tagTree
     */
    public void setResourceTree(JTree resourceTree) {
        this.resourceTree = resourceTree;
    }


    /**
     * Get the value of activeApplication
     *
     * @return the value of activeApplication
     */
    public Application getActiveApplication() {
        return activeApplication;
    }

    /**
     * Set the value of activeApplication
     *
     * @param activeApplication new value of activeApplication
     */
    public void setActiveApplication(Application activeApplication) {
        this.activeApplication = activeApplication;
    }

    @Override
    public void executeTask(Task task) {
        this.taskQueue.addTask(task);
    }
    
}
